# coding: UTF-8
from django.conf.urls.defaults import url, patterns, include
from django.conf import settings
from senbzblog.settings import STATIC_ROOT_PATH
from senbzblog.blog import views
from senbzblog.index import index

#from django.contrib import admin
#admin.autodiscover()

urlpatterns = patterns('',
    
    url(r'^blog/', include('senbzblog.blog.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    url(r'^admin/', include('senbzblog.blog.admin.admin_url')),
#    url(r'^admin/', include(admin.site.urls)),
#    url(r'^comments/', include('django.contrib.comments.urls')),
    
    #静态文件
    url(r'^senbzblog/(?P<path>.*)', 'django.views.static.serve', {'document_root':settings.ROOT_PATH}),
    url(r'^static/(?P<path>.*)', 'django.views.static.serve', {'document_root':STATIC_ROOT_PATH}),
    url(r'^site_media/(?P<path>.*)', 'django.views.static.serve', {'document_root':settings.MEDIA_ROOT}),
    
    #login logout register
    url(r'^accounts/login', views.user_login, name='user_login'),
    url(r'^accounts/logout$', views.user_logout, name='user_logout'),
    url(r'^accounts/register', views.user_register, name='user_register'),
    
    # index task
#    url(r'^indextask$', index.index_process, name='index_task'),
)
